/// <reference path="../_all.ts" />

module Application.Utility {

    export class Booleans {
        static parse(val: any, def? : boolean):boolean {
            var res = false;
            if (val == null) {
                res = def;
            } else {
                val = val.toString().toLowerCase();
                res = val == '1' || val == 'true';
            };
            return res;
        }
    }

}